@extends('layouts.admin')
@section('css')
<link rel="stylesheet" type="text/css" href="{{ asset('admin/assets/bootstrap-fileupload/bootstrap-fileupload.css') }}" />
@endsection
@section('content')
<section id="main-content">
          <section class="wrapper">
              <!-- page start-->
             
              <div class="row">
               
                  <div class="col-lg-12">
                      <section class="panel">
                          <header class="panel-heading">
                              编辑【{{ $group->name }}】
                          </header>
                          <div class="panel-body">
                                @if (count($errors) > 0)
                                <div class="alert alert-block alert-danger fade in">
                                  <button data-dismiss="alert" class="close close-sm" type="button">
                                      <i class="icon-remove"></i>
                                  </button>
                                  <!-- <strong>Oh snap!</strong> Change a few things up and try submitting again. -->
                                   <ul>
                                        @foreach ($errors->all() as $error)
                                        <li>{{ $error }}</li> 
                                        @endforeach
                                    </ul>
                              </div>
                              @endif
                              <form class="form-horizontal" action="{{ route('admin.statistics.groups.edit',['id'=>$group->id])}}" role="form" method="POST" enctype="multipart/form-data">
                                  
                                                                    
              
                                  <div class="form-group">
                                      <label for="inputEmail1" class="col-lg-2 col-sm-2 control-label">名称</label>
                                      <div class="col-lg-10">
                                          <input type="text" class="form-control" id="Name" name="name" value="{{ $group->name }}" placeholder="Name">
                                          <p class="help-block"></p>
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <div class="col-lg-offset-2 col-lg-10">
                                            {{ csrf_field() }}
                                            <input type="hidden" class="form-control" id="msgtype" name="msgtype" />
                                          <button type="submit" class="btn btn-danger">提交</button>
                                      </div>
                                  </div>
                                  
                              </form>
                          </div>
                      </section>
                      
                  </div>
              </div>

             
              <!-- page end-->
          </section>
      </section>
@endsection
@section('javascript')
 @parent
  <!-- <script type="text/javascript" src="{{ asset('backend/assets/ckeditor/ckeditor.js') }}"></script> -->
  <script type="text/javascript" src="{{ asset('admin/assets/bootstrap-fileupload/bootstrap-fileupload.js') }}"></script>
   <!-- <script src="{{ asset('backend/js/advanced-form-components.js') }}"></script> -->
  <script type="text/javascript" src="{{ asset('admin/assets/ckeditor/ckeditor.js')}}"></script>
  <script src="{{ asset('admin/js/bootstrap-switch.js')}}"></script>
  <script type="text/javascript" src="{{ asset('admin/js/jquery.tagsinput.js')}}"></script>
  <script type="text/javascript">
  $(function() {

        $(".tagsinput").tagsInput();
        $("[data-toggle='switch']").wrap('<div class="switch" />').parent().bootstrapSwitch();

    });
  </script>
<!-- <script src="{{ asset('admin/js/form-component.js') }}"></script> -->
@endsection

